<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        body {
            padding: 0;
            margin: 0 auto;
            text-align: center;
        }
        
        .select {
            width: 200px;
            height: 40px;
            text-align: center;
            margin-top: 20px;
        }
        
        .getSelect {
            font-size: 1em;
            margin-top: 20px;
            border: 1px solid #d4d4d4;
        }
        
        .btn {
            width: 400px;
            height: 40px;
            border: 0;
            box-shadow: 0;
            margin-top: 20px;
        }
    </style>
</head>

<body>
    <div ng-app="myApp" ng-controller="myCtrl" class="all">
        <select class="select" ng-model="category" ng-options="x.category for x in categorys" ng-change="changeType(category)">
            <option value="">--产品类目--</option>
        </select>
        <select class="select" ng-model="devicedefinition" ng-options="x.deviceName  for x in devicedefinitions" ng-change="changeDev(devicedefinition)">
            <option value="">--设备名（mac)--</option>
        </select>
        <br>
        <select class="select" ng-model="devicedetail" ng-options="p.display_name for p in devicedetails" ng-change="changeParam(devicedetail)">
            <option value="">--参数值--</option>
        </select>
        <select ng-model="valuedetails" ng-repeat="x in data_ranges">
            <option value="">{{x}}</option>
        </select>
        <br>
        <div ng-switch="type">
            <div ng-switch-when="bool" class="getSelect">
                <label ng-repeat="x in data_ranges">
                    <input ng-model="$parent.$parent.selectvalue" type="radio" name="radio" value="{{x}}">{{x}}
                </label>
            </div>
            <div ng-switch-when="enum" class="getSelect">
                <select ng-model="$parent.$parent.selectvalue" ng-options="p in data_ranges">
                    <option value="">--值--</option>
                </select>
            </div>
            <div ng-switch-when="num" class="getSelect">
                <select ng-model="$parent.selectvalue">
                    <option value="0">&ne;</option>
                    <option value="1">=</option>
                    <option value="2">&lt;</option>
                    <option value="3">&gt;</option>
                    <option value="4">&lt;=</option>
                    <option value="5">&gt;=</option>
                </select>
                <input type="text" ng-model="$parent.selectText">
            </div>

        </div>
        <button class="btn" ng-click="post()">提交</button>
        <p>
            {{devicetype.category}},{{yourdevice.dev}},{{param.display_name}},{{selectvalue}},{{selectText}}
        </p>

    </div>

    <script src="http://cdn.bootcss.com/angular.js/1.6.6/angular.js"></script>
    <script src="index.js"></script>
</body>

</html>